ADDIN_BUILD = $(top_builddir)/build
ASSEMBLY = $(ADDIN_BUILD)/MonoDevelop.CodeAnalysis.Gendarme.dll
REFS =  \
	$(GLIB_SHARP_LIBS) \
	$(GTK_SHARP_LIBS) \
	$(MONODEVELOP_LIBS) \
	-r:../../../../../../usr/lib/monodevelop/bin/Mono.Cecil.dll \
	-r:../build/MonoDevelop.CodeAnalysis.dll \
	-r:../dlls/Gendarme.Framework.dll \
	-r:../dlls/Mono.Cecil.dll \
	-r:Mono.Posix \
	-r:System \
	-r:System.Xml

FILES =  \
	GendarmeAnalyzer.cs \
	GendarmeRule.cs \
	GendarmeRuleCache.cs \
	GendarmeRuleLoader.cs \
	GendarmeRunner.cs \
	GendarmeViolation.cs \
	gtk-gui/generated.cs \
	Utilities.cs

RES =  \
	gtk-gui/gui.stetic \
	MonoDevelop.CodeAnalysis.Gendarme.addin.xml

all: $(ASSEMBLY)

$(ASSEMBLY): $(FILES) $(build_resources)
	mkdir -p $(ADDIN_BUILD)
	$(CSC) $(CSC_FLAGS) $(REFS) $(build_resources:%=/resource:%) $(build_sources) -out:$@ -target:library


assemblydir = $(MD_ADDIN_DIR)/MonoDevelop.CodeAnalysis
assembly_DATA = $(ASSEMBLY)

CLEANFILES = $(ASSEMBLY) $(ASSEMBLY).mdb
EXTRA_DIST = $(FILES) $(RES)

include $(top_srcdir)/Makefile.include
